<?php
class LinhaRegular extends AppModel {

	var $name = 'LinhaRegular';
	var $primaryKey = 'id_linha_regular';
	var $validate = array(
		'nome' => array('notempty'),
		'origem' => array('notempty'),
		'destino' => array('notempty'),
		'horario' => array('notempty'),
		'frequencia' => array('notempty')
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $hasAndBelongsToMany = array(
		'PatrimonioServico' => array(
			'className' => 'PatrimonioServico',
			'joinTable' => 'linha_regular_patrimonio_servico',
			'foreignKey' => 'id_linha_regular',
			'associationForeignKey' => 'id_patrimonio_servico',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'finderQuery' => '',
			'deleteQuery' => '',
			'insertQuery' => ''
		)
	);

}
?>